package com.example.chatzsyproject.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.example.chatzsyproject.R;
import com.example.chatzsyproject.adapter.CircleOffFriendsAdapter;
import com.example.chatzsyproject.adapter.SystemPushAdapter;
import com.example.chatzsyproject.base.BaseActivity;
import com.example.chatzsyproject.model.CircleOffFriendModel;
import com.example.chatzsyproject.model.SystemPushModel;
import com.example.chatzsyproject.view.AZListView.azlist.AZTitleDecoration;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 系统消息
 */
public class SystemPushActivity extends BaseActivity {
    SystemPushAdapter mAdapter;
    @BindView(R.id.recyclerView)
    RecyclerView recyclerView;
    private List<SystemPushModel> list = new ArrayList<>();

    @BindView(R.id.tv_title)
    TextView tv_title;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_systempush);
        ButterKnife.bind(this);
        init();
    }

    public void init() {
        tv_title.setText("系统推送");
        recyclerView.setLayoutManager(new LinearLayoutManager(SystemPushActivity.this));
        recyclerView.addItemDecoration(new AZTitleDecoration(new AZTitleDecoration.TitleAttributes(SystemPushActivity.this)));
        mAdapter = new SystemPushAdapter(R.layout.adapter_systempush, list);
        recyclerView.setAdapter(mAdapter);
        mAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                //商品点击事件
            }
        });

        for (int i = 0; i < 5; i++) {
            SystemPushModel model = new SystemPushModel();
            list.add(model);
        }
        mAdapter.notifyDataSetChanged();

    }
}
